pp108 : busDataIsland Property

busDataIsland Property


String that points to the unique identifier of the busdataisland from which the data is to be taken for tree.

Syntax

HTML

<div cordysType="wcp.libaray.ui.Tree"   id=treeID treeSchema=schemaID busDataIsland=sBDI >
...
</div>

Scripting

treeID.busDataIsland [ =sBDI ]


Parameters

Parameter

Description

sBDI

String that points to the ID of the busdataisland from which data is to be presented in tree.


Remarks


If this property is to be used to display the data in a tree structure from busdataisland, then the request sent for the busdataisland should be of synchronous mode (async=false). Since data retrieval needs to be synchronous, the property is assigned to the tree after the data has completely arrived to the busdataisland. For this, it is recommended to set the property when ondatacompleted event of the busdataisland is fired.

Since the request sent through the BDI is synchronous, it is expected to set thebusDataIslandproperty first and thentreeSchemashould be set.

Example


The following example demonstrates the usage of the property.

<!-- Constructor for BDI -->
<script type="cordys/xml" id="constructor">
    <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
        <SOAP:Body>
            <GetEmployees xmlns="http://schemas.cordys.com/1.0/demo/northwind">
                <fromEmployeeID>1</fromEmployeeID>
                <toEmployeeID>999</toEmployeeID>
            </GetEmployees>
        </SOAP:Body>
    </SOAP:Envelope>
</script>
<!-- Schema for tree -->
<script type="cordys/xml" id="islandSchema">
    <TreeSchema>
        <searchPath>//data/*/tuple/old/</searchPath>
        <multipleSelect>true</multipleSelect>
        <Root>
            <description>Employees</description>
        </Root>
        <TreeItem id="EmployeesID">
            <searchPath>Employees</searchPath>
            <description>FirstName</description>
            <onselect>populate</onselect>
            <contextMenu>myContext</contextMenu>
        </TreeItem>
    </TreeSchema>
</script>
<!-- Function call assignData() -->
function assignData()
{
    <!-- Set the reference to property first -->
    sampletree.busDataIsland = "bdiEmployees";
    
    <!-- Set the schema -->
    sampletree.treeSchema = "islandSchema";
}
<!-- tree definition -->
div cordysType="wcp.library.ui.Tree"id='sampletree' ></div>

<!-- BDI request to the Employees table in Northwind database -->
<div cordysType="wcp.library.data.BusDataIsland" id="bdiEmployees" request="constructor.XMLDocument" async="false" ondatacompleted="assignData()" >
</div>

See Also


tree, treeSchema